
export const getParentNode = (data)=>{
  let result = [];
  data&&data.map((i)=>{
    let pathArray = i.Path.split('/');
    let arr = pathArray.length&&pathArray.filter(p=>{
      return p&&Number(p)>0})
    if(arr.length===1){
      result.push({
        value:i.Id,
        name:i.Name
      })
    }
  })
  return result
};
export default getParentNode
